-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
BUG: fix HDFStore.append with all empty strings error (GH12242) #23435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello @josham! Thanks for submitting the PR.
|
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -1216,6 +1216,7 @@ Notice how we now instead output ``np.nan`` itself instead of a stringified form | |||
- :func:`read_sas()` will correctly parse sas7bdat files with data page types having also bit 7 set (so page type is 128 + 256 = 384) (:issue:`16615`) | |||
- Bug in :meth:`detect_client_encoding` where potential ``IOError`` goes unhandled when importing in a mod_wsgi process due to restricted access to stdout. (:issue:`21552`) | |||
- Bug in :func:`to_string()` that broke column alignment when ``index=False`` and width of first column's values is greater than the width of first column's header (:issue:`16839`, :issue:`13032`) | |||
- Bug in :meth:`HDFStore.append` when appending a :class:`DataFrame` with an empty string column and min_itemsize < 8 (:issue:`12242`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double backticks around min_itemsize
pandas/tests/io/test_pytables.py
Outdated
store.append('df', df1, min_itemsize={'x': 1}) | ||
store.append('df', df2, min_itemsize={'x': 1}) | ||
tm.assert_frame_equal(store.select('df'), | ||
pd.concat([df1, df2])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of comparing to pd.concat
. Can you explicitly construct the DataFrame
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you push this to a new test, the existing ones are really long already
Codecov Report
@@ Coverage Diff @@
## master #23435 +/- ##
==========================================
- Coverage 92.21% 92.21% -0.01%
==========================================
Files 161 161
Lines 51189 51187 -2
==========================================
- Hits 47204 47202 -2
Misses 3985 3985
Continue to review full report at Codecov.
|
pandas/tests/io/test_pytables.py
Outdated
store.append('df', df1, min_itemsize={'x': 1}) | ||
store.append('df', df2, min_itemsize={'x': 1}) | ||
tm.assert_frame_equal(store.select('df'), | ||
pd.concat([df1, df2])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you push this to a new test, the existing ones are really long already
can you rebase again, the whatsnew is conflicted. ping on green. |
lgtm. ping on green. |
@jreback green |
thanks @josham |
git diff upstream/master -u -- "*.py" | flake8 --diff